from tkinter import *
x=int(input("Введите начальные координаты X "))
y=int(input("Введите начальные координаты Y"))

d = int(input("Введите кооэфицент увеличения"))
xx = x * d
yy = y * d
cor=[x,y, x+10,y, x+10,y+10, x+20,y+10, x+20,y+20, x+10,y+20, x+10,y+30, x,y+30]

if d == 0 and xx>=0 and xx<=500 and yy>=0 and yy<=500:
    pass
else:
    if d > 0 and 0*d+xx>=0 and 0*d+yy>=0 and 20*d+xx<=500 and 20*d+yy<=500:
        pass
    else:
        if d < 0 and 20*d+xx>=0 and 20*d+yy>=0 and 0*d+xx<=500 and 0*d+yy<=500:
            pass
        else:
            print("Фигура привышает max размер поля")
            exit()
root = Tk()

root.title("it марафон - 1449")
root.geometry("500x500")
can = Canvas(bg="white", width=500, height=500)
can.pack(anchor=CENTER, expand=1)
canvas.create_polygon(coords[0] *d+x, coords[1] *d+y,
                        coords[2] *d+x, coords[3] *d+y,
                        coords[4] *d+x, coords[5] *d+y,
                        coords[6] *d+x, coords[7] *d+y,
                        coords[8] *d+x, coords[9] *d+y,
                        coords[10]*d+x, coords[11]*d+y,
                        coords[12]*d+x, coords[13]*d+y,
                        coords[14]*d+x, coords[15]*d+y, fill='indigo')
root.mainloop

